<form name="resetForm">
    <div class="modal-header">
        <h4 class="modal-title">密码重置链接</h4>
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true" (click)="clear()">&times;</button>
    </div>

    <div class="modal-body">
        <div class="alert alert-success" *ngIf="showClipboardSuccess">
            <p>链接已成功复制到剪贴板。</p>
        </div>
        <div class="alert alert-danger" *ngIf="showClipboardError">
            <p>无法将链接复制到剪贴板。</p>
        </div>
        <jhi-alert-error></jhi-alert-error>
        <p>用户可以使用此链接重置密码。</p>
        <form>
            <label for="reset-link"></label>
            <input type="text" id="reset-link" [value]="resetLink" size="50" readonly #resetLinkInput />
            <button class="btn btn-primary" (click)="generateResetLink(user?.email)">
                <fa-icon [icon]="'sync'" [spin]="isGeneratingLink"></fa-icon>
                &nbsp;生成链接
            </button>
        </form>
    </div>
    <div class="modal-footer">
        <button type="submit" class="btn btn-secondary" data-dismiss="modal" (click)="clear()">
            <fa-icon [icon]="'times'"></fa-icon>&nbsp;<span>关闭</span>
        </button>
    </div>
</form>
